#include "detk/file.h"

/** This function reads a binary word from a FILE using a (Intel? 
Motorola?) byte order. */
int mx_fgetw(FILE * f)
{
	int b1, b2;

/**author fgetw taken from <a href="http://alleg.sourceforge.net/">Allegro</a> sources. */

	if ((b1 = getc(f)) != EOF)
		if ((b2 = getc(f)) != EOF)
			return ((b2 << 8) | b1);

	return EOF;
}
